package com.bootdo.lvyou.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.lvyou.dao.LvyouScenicTicketMoneyDao;
import com.bootdo.lvyou.domain.LvyouScenicTicketMoney;
import com.bootdo.lvyou.service.LvyouScenicTicketMoneyService;



@Service
public class LvyouScenicTicketMoneyServiceImpl implements LvyouScenicTicketMoneyService {
	@Autowired
	private LvyouScenicTicketMoneyDao lvyouScenicTicketMoneyDao;
	
	@Override
	public LvyouScenicTicketMoney get(Long id){
		return lvyouScenicTicketMoneyDao.get(id);
	}

	@Override
	public LvyouScenicTicketMoney getByNowDate(Long ticketId, String nowDate) {
		return lvyouScenicTicketMoneyDao.getByNowDate(ticketId,nowDate);
	}

	@Override
	public List<LvyouScenicTicketMoney> list(Map<String, Object> map){
		return lvyouScenicTicketMoneyDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return lvyouScenicTicketMoneyDao.count(map);
	}
	
	@Override
	public int save(LvyouScenicTicketMoney lvyouScenicTicketMoney){
	
		if(lvyouScenicTicketMoney.getId() != null) {
			return lvyouScenicTicketMoneyDao.update(lvyouScenicTicketMoney);
		}else {
			return lvyouScenicTicketMoneyDao.save(lvyouScenicTicketMoney);
		}		
	
		
	}
	
	@Override
	public int update(LvyouScenicTicketMoney lvyouScenicTicketMoney){
		return lvyouScenicTicketMoneyDao.update(lvyouScenicTicketMoney);
	}
	
	@Override
	public int remove(Long id){
		return lvyouScenicTicketMoneyDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return lvyouScenicTicketMoneyDao.batchRemove(ids);
	}
	
}
